<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
  <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0-beta/css/bootstrap.min.css">
  <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>
  <script src="https://cdn.bootcss.com/bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>
	<script>/*Fixing iframe window.innerHeight 0 issue in Safari*/document.body.clientHeight;</script>
	<script src="https://gw.alipayobjects.com/os/antv/assets/g2/3.0.5-beta.5/g2.min.js"></script>
	<script src="https://gw.alipayobjects.com/os/antv/assets/data-set/0.8.6/data-set.min.js"></script>
  <style type="text/css">
  	body{overflow-x: hidden;}
  	a{text-decoration: none;color: black;}
		.btn-group{text-align: center;font-size: 14px}
		.btn-group>div{width: 16.6%;}
		.btn-group>div>button{width: 100%}
		.btn-group>div>div>a{font-size: 12px}
		.btn-group>a{width: 16.6%;}
  </style>
  <script type="text/javascript">
$(function  () {
	
	//初始化
	//确定用户是否商家
	is_store()
	
	

	function is_store () {

		let user='<%- user%>'
		
		let data={};
	     	    data.user=user
	     	    data=JSON.stringify(data)
	     	    let ur='/jd_index?order=is_store&data='+data;    
						 ur=encodeURI(ur)
						 

						 console.log('user'+data+'end')

				fetch(ur, {
				 method: 'GET',
				})
				.then((res)=>{
				return res.json() 
				})
				.then((res)=>{
					console.log('确定是否商家的返回值'+res)
					 if(res==0){
					 	//event.preventDefault()
						$('.a_no').attr('href','#');//去掉a标签中的onclick事件
					  $('.a_no').on('click',function  () {
					  	 alert('您还不是商家，请先点击下面的申请店铺，或者，你被系统后来禁止，请联系管理员！！')
					  })
					 }else{
					 	
					 }
				})
	}
	
	
	
	
	
	
	
  		
})



  </script>
</head>
<nav class="navbar navbar-expand-sm  navbar-dark fixed-top" style="background: #fff;">
	<div class="btn-group" style="width: 100%">
		<a href="../" class="btn btn-info" role="button">回到首页</a>
		<a href="##" class="btn btn-info" role="button">消息</a>
    <div class="btn-group">
      <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
				我的京东
      </button>
      <div class="dropdown-menu">
        <a class="dropdown-item" href="/jd/ucenter">已买到的宝贝</a>
						<a class="dropdown-item" href="/jd/account">账户设置</a>
						<a class="dropdown-item" href="/jd/login">登陆</a>
      </div>
		</div>
		<div class="btn-group">
      <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
				购物车
      </button>
      <div class="dropdown-menu">
        <a class="dropdown-item" href="/jd/shop">查看我的购物车</a>
      </div>
		</div>
		<div class="btn-group">
      <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
				收藏夹
      </button>
      <div class="dropdown-menu">
        <a class="dropdown-item" href="/jd/collect">收藏的宝贝</a>
      </div>
		</div>
		<div class="btn-group">
      <button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
				卖家中心
      </button>
      <div class="dropdown-menu">
				<a class="dropdown-item a_no" href="/jd/my_store">我的店铺</a>
				<a class="dropdown-item a_no" href="/jd/sell_out" >已卖出的宝贝</a>
        <a class="dropdown-item a_no" href="/jd/sell_in" >出售中的宝贝</a>
        <a class="dropdown-item" href="/jd/open_store">免费开店</a>

      </div>
    </div>
  </div>
</nav>
<div style="margin-bottom: 70px;">
	
</div>



<!-- 
<div class="row" style="font-family: '微软雅黑';font-size: 13px;margin-top: 10px">
    <div class="col-3" style="background: #e4e4e4;" >
			<a class="nav-link" href="#">消息<sapn>0</sapn></a>
			<a class="nav-link" href="../">回到首页</a>
    </div>
    
  
    <div class="col" style="background: #e4e4e4;">
     
		<nav class="navbar navbar-expand-sm sm-light navbar-light" style="height: 30px;">
		  <ul class="navbar-nav">
		    
		   
		    <li class="nav-item dropdown">
		      <a class="nav-link dropdown-toggle" href="/jd/ucenter" id="navbardrop" data-toggle="dropdown">
		        我的京东
		      </a>
		      <div class="dropdown-menu">
		        <a class="dropdown-item" href="/jd/ucenter">已买到的宝贝</a>
						<a class="dropdown-item" href="/jd/account">账户设置</a>
						<a class="dropdown-item" href="/jd/login">登陆</a>
		      </div>
		    </li>
		    <li class="nav-item dropdown">
		      <a class="nav-link dropdown-toggle" href="/jd/shop" id="navbardrop" data-toggle="dropdown">
		        购物车
		      </a>
		      <div class="dropdown-menu">
		        <a class="dropdown-item" href="/jd/shop">查看我的购物车</a>

		      </div>
		    </li>
		    <li class="nav-item dropdown">
		      <a class="nav-link dropdown-toggle" href="/jd/collect" id="navbardrop" data-toggle="dropdown">
		       ⭐收藏夹
		      </a>
		      <div class="dropdown-menu">
		        <a class="dropdown-item" href="/jd/collect">收藏的宝贝</a>
		      </div>
		    </li>

		   <li class="nav-item dropdown">
		      <a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
		     卖家中心
		      </a>
		      <div class="dropdown-menu">
		      	
		      	<a class="dropdown-item a_no" href="/jd/my_store" >我的店铺</a>
		        <a class="dropdown-item a_no" href="/jd/sell_out" >已卖出的宝贝</a>
            <a class="dropdown-item a_no" href="/jd/sell_in" >出售中的宝贝</a>
            <a class="dropdown-item" href="/jd/open_store">免费开店</a>
		      </div>
		    </li>
		    <li class="nav-item dropdown">
		      <a class="nav-link dropdown-toggle" href="#" id="navbardrop" data-toggle="dropdown">
		     联系客服
		      </a>
		      <div class="dropdown-menu">
		      	<a target="_blank"  class="dropdown-item" href="http://wpa.qq.com/msgrd?v=3&uin=494588788&site=qq&menu=yes">消费者客服</a>
		      <a target="_blank"  class="dropdown-item" href="http://wpa.qq.com/msgrd?v=3&uin=494588788&site=qq&menu=yes">卖家客服</a> 
		      </div>
		    </li>
		  </ul>
		</nav>
    
    </div>
  </div> -->

 
 
 
